//
//  HRUserAccount.swift
//  microBlog
//
//  Created by HR_W on 16/5/22.
//  Copyright © 2016年 admin. All rights reserved.
//

import UIKit

class HRUserAccount: NSObject {
    //用户授权的唯一票据,用户访问接口的权限的唯一标识
    var access_token: String?
    
    var exrires_data: NSDate?
    //用户授权的uid 标识唯一用户
    var uid: String?
    //用户的名称
    var name : String?
    
    //用户头像地址
    var avatar_large: String?
    //用户token过期时间
    var expires_in: NSTimeInterval = 0 {
    
        didSet {
            //一旦KVC 给expires_in 就开始 计算过期时间
            exrires_data = NSDate(timeIntervalSinceNow: expires_in)
            
        }
    
    }
    //字典转模型
    init(dict: [String: AnyObject]) {
        super.init()
        
        setValuesForKeysWithDictionary(dict)
    }
    //过滤
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
    
    
}
